package com.sishu.njrtsdms.domain.dto;


import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.PositiveOrZero;
import org.jooq.types.ULong;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 绩点分配情况传输类
 *
 * @param point    分配绩点,两位小数
 * @param assignee 受分配人用户id
 * @param remark   备注
 */
public record TcpPointAssignRecordDTO(

        @PositiveOrZero(message = "绩点评分必须为非负数")
        @Digits(integer = 10, fraction = 2, message = "绩点评分长度最长为10,小数点最多两位")
        @DecimalMin(value = "0.00", message = "绩点评分最低为0分")
        @NotNull(message = "绩点评分不可为空")
        BigDecimal point,

        @NotNull(message = "受分配人用户id不可为空")
        ULong assignee,

        String remark

) implements Serializable {


}
